let express = require('express')

module.exports = function(){
    var router = express.Router()

	const routerList = [
		{ url: '/api-auth', path: './auth/index.js' },
		{ url: '/api-common', path: './common/index.js' },
		{ url: '/api-base', path: './base/index.js' },
		{ url: '/api-file', path: './file/index.js' }
	]

	routerList.map( ({url, path }) => router.use(url,require(path)()) )

    return router
}
